<?php

function displayImages($array) {
	if(is_array($array)) {
		echo "<table><tr>";
		foreach ($array as $key => $value) {
			if(is_array($value)) {
				displayImages($value);
			}
			else {
				echo "<td>";
				?>
<img src="<?php echo $value  ?>"
	alt="<?php echo $value ?>" height="100" width="100" />
				<?php
				echo "</td>";
			}
		}
		echo "</tr></table>";
	}
	else {
		?>
<table>
	<tr>
		<td><img src="<?php echo $array  ?>" alt="<?php echo $array ?>" height="100" width="100" />
		</td>
	</tr>
</table>
		<?php
	}
}

if(isset($this->additionalImages)) {
	echo "Images from Additional Images tag";
	displayImages($this->additionalImages);
	unset($this->additionalImages);
}
if(isset($this->additionalImagesThumbnails)) {
	echo "Image from Additional Images Thumbnails";
	displayImages($this->additionalImagesThumbnails);
	unset($this->additionalImagesThumbnails);
}
if(isset($this->data["imageSource"])) {
	echo "Image Source in Data";
	displayImages($this->data["imageSource"]);
	unset($this->data["imageSource"]);
}
if(isset($this->data["imageSourceDetail"])) {
	echo "Image Source Detail in Data";
	displayImages($this->data["imageSourceDetail"]);
	unset($this->data["imageSourceDetail"]);
}

?>